package businesslogic.promotionbl;

import java.util.ArrayList;

import javax.swing.text.html.HTMLDocument.Iterator;

public class GoodsList {

	ArrayList<GoodsLineItem> goods=new ArrayList<GoodsLineItem>();
	
	public void add(GoodsLineItem lineItem){
		goods.add(lineItem);
	}
	
	public void del(String id){
		ArrayList<GoodsLineItem> temp=new ArrayList<GoodsLineItem>();
		for(GoodsLineItem item:goods){
			if(item.id.equals(id)){
				temp.add(item);
			}
		}
		goods.removeAll(temp);
		
	}
}
